home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsgcc139_tar.Z / vmsgcc139_tar / include / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  1.9 KB  |  67 lines

  1. /*
  2.  *    VAX-11 "C" runtime compatible signal definitions
  3.  */
  4.  
  5. #ifndef    NSIG
  6. #define NSIG    32        /* number of signals */
  7.  
  8. #define    SIGHUP    1        /* hangup */
  9. #define    SIGINT    2        /* interrupt */
  10. #define    SIGQUIT    3        /* quit */
  11. #define    SIGILL    4        /* illegal instruction (not reset when caught) */
  12. #define    ILL_RESAD_FAULT    0x0    /* reserved addressing mode fault */
  13. #define    ILL_PRIVIN_FAULT 0x1    /* privilidged instruction fault */
  14. #define    ILL_RESOP_FAULT    0x2    /* reserved operand fault */
  15. #define    SIGTRAP    5        /* trace trap (not reset when caught) */
  16. #define    SIGIOT    6        /* IOT instruction */
  17. #define    SIGEMT    7        /* EMT instruction */
  18. #define    SIGFPE    8        /* floating point exception */
  19. #define    FPE_INTOVF_TRAP 0x1
  20. #define    FPE_INTDIV_TRAP 0x2
  21. #define    FPE_FLTOVF_TRAP 0x3
  22. #define    FPE_FLTDIV_TRAP 0x4
  23. #define    FPE_FLTUND_TRAP 0x5
  24. #define    FPE_DECOVF_TRAP 0x6
  25. #define    FPE_SUBRNG_TRAP 0x7
  26. #define FPE_FLTOVF_FAULT 0x8
  27. #define FPE_FLTDIV_FAULT 0x9
  28. #define FPE_FLTUND_FAULT 0xa
  29. #define    SIGKILL    9        /* kill (cannot be caught or ignored) */
  30. #define    SIGBUS    10        /* bus error */
  31. #define    SIGSEGV    11        /* segmentation violation */
  32. #define SIGSYS    12        /* bad argument to system call */
  33. #define SIGPIPE    13        /* write to a pipe with no one to read it */
  34. #define SIGALRM    14        /* alarm clock */
  35. #define SIGTERM    15        /* software termination signal from kill */
  36.  
  37.  
  38. struct    sigvec
  39. {
  40.     int    (*sv_handler)();    /* handler address */
  41.     int    sv_mask;        /* mask of signals to be blocked */
  42.     int    sv_onstack;        /* flag to indicate signal stack */
  43. };
  44.  
  45. struct    sigcontext
  46. {
  47.     int    sc_onstack;        /* signal stack flag to restore */
  48.     int    sc_mask;        /* signal mask to restore */
  49.     int    sc_sp;            /* stack pointerto restore */
  50.     int    sc_pc;            /* pc to return to */
  51.     int    sc_ps;            /* psl to restore */
  52. };
  53.  
  54. struct    sigstack
  55. {
  56.     char    *ss_sp;            /* signal stack pointer */
  57.     int    ss_onstack;        /* current status */
  58. };
  59.  
  60. int    (*signal())(),(*ssignal())();
  61.  
  62. #define    BADSIG    (int (*)())-1
  63. #define    SIG_DFL    (int (*)())0    /* default */
  64. #define SIG_IGN    (int (*)())1    /* ignore */
  65.  
  66. #endif    NSIG
  67.